<i class="fa fa-group" style="font-size:28px">&nbsp;球队</i>
<button type="button" class="btn btn-success" style="margin-left: 80%;" onclick="toTeamListPage()">球队列表页</button>
<hr>

<div id="teamContent">
	<div id="teamInfo" style="height: 240px;">
		<div id="teamImage" style="float: left; margin-right:20px">
			<img src="http://www.stat-nba.com/image/teamImage/${team.teamId}.gif" width="180px" height="120px" />
		</div>
		<table style="float: left;">
			<thead>
				<tr align="center">
					<th colspan="2" style="font-size: 20px;">${team.teamCName!}</th>
				</tr>
			</thead>
			<tbody>
				<tr>
					<td>球队英文名：</td>
					<td>${team.teamEName!}</td>
				</tr>
				<tr>
					<td>${team.branch!}</td>
					<td>${team.subarea!}</td>
				</tr>
			</tbody>
		</table>
		
		<div id="teamRadarMap" style="margin-left:700px; width: 240px; height: 240px;">
			
		</div>
	</div>
	<hr>
	
	

	<h5>历年效力球员数据</h5>
	<div>
		<#list seasons as season>
			<button type="button" style="margin: 4px 4px;" onclick="getPerennialPlayer('${season}', '${team.teamId}', $(this))" class="btn btn-light">${season[2..3]}-${((season?number+1)?string)[3..4]}赛季</button>
		</#list>
	</div>

	<div id="perennialPlayer">

	</div>


</div>

<script type="text/javascript">
	$(document).ready(function(){
		var data = {
			"teamId": "${team.teamId}",
		}
		$.ajax({
			url: "/getTeamRadarMap",
			type: "POST",
			contentType: "application/json",
			data: JSON.stringify(data),
			success: function(response) {
				var data = response.data;
				var myChart = echarts.init($("#teamRadarMap").get(0));
				var option = {
					title: {
						// text: '球队场均数据'
					},
					tooltip: {},
					radar: {
						// shape: 'circle',
						name: {
							textStyle: {
								color: '#fff',
								backgroundColor: '#999',
								borderRadius: 3,
								padding: [3, 5]
							}
						},
						indicator: [{
								name: '得分',
								max: 300
							},
							{
								name: '助攻',
								max: 80
							},
							{
								name: '失误',
								max: 50
							},
							{
								name: '投篮命中率',
								max: 1.0
							},
							{
								name: '篮板',
								max: 120
							},
							
						],
						radius: 60
					},
					series: [{
						name: '球队场均数据',
						type: 'radar',
						// areaStyle: {normal: {}},
						data: [{
							value: [data.score, data.assists, data.fault, data.shooting_percentage, data.rebound],
							name: '球队场均数据'
						}]
					}]
				};
				myChart.setOption(option, true);
			}
		});
	})
</script>